package com.java.comprehensive.design.behavioral_model.command_pattern;

/**
 * @Author 窦绍飞
 * @create 2023/2/16
 */
public class Client {
	public static void main(String[] args) {
		Order order = new Order();
		order.setDinnerTableCode(001);
		order.setFood("宫保鸡丁", 2);
		order.setFood("可口可乐", 2);
		Order order1 = new Order();
		order1.setDinnerTableCode(002);
		order1.setFood("可口可乐", 1);
		order1.setFood("红烧肉", 1);

		// 创建厨师对象
		SeniorChef seniorChef = new SeniorChef();
		// 命令对象
		Command c1 = new OrderCommand(seniorChef, order);
		Command c2 = new OrderCommand(seniorChef, order1);

		// 创建调用者对象
		Waitor invoke = new Waitor();
		invoke.setCommand(c1);
		invoke.setCommand(c2);

		invoke.orderUp();

	}
}
